package cn.itsource.blog.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class ArticleType {

    private Long id;
    // 文章类型名
    private String typeName;
    // 文章状态
    private Integer status;
    // 文章创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime = new Date();
    // 文章修改时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    // 作者id
    private Long parentId;

    //保存父类型的名称
    private String parentTypeName;
    // 子类集合
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<ArticleType> children = new ArrayList<>();
}
